#include<iostream>
#include<string>
using namespace std;

int main()
{
    string s;
    bool flag = true;
    int first;
    int i  = 1, cnt = 0;
    while (getline(cin, s), s != ".")
    {
        cin >> ws;
        if (s.find("chi1 huo3 guo1") != -1 )
        {
            if (flag)
            {
                flag = false;
                first = i;
            }
            cnt++;
        }
        i++;
    }

    cout << i - 1 << endl;
    if (!cnt) cout << "-_-#" << endl;
    else cout << first << " " << cnt << endl;
    return 0;
}